/*
 Navicat Premium Data Transfer

 Source Server         : docker_ 087c6f86492c
 Source Server Type    : MySQL
 Source Server Version : 80027
 Source Host           : localhost:3306
 Source Schema         : vue3_admin

 Target Server Type    : MySQL
 Target Server Version : 80027
 File Encoding         : 65001

 Date: 28/05/2025 10:30:21
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for application
-- ----------------------------
DROP TABLE IF EXISTS `application`;
CREATE TABLE `application` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `department_id` int NOT NULL COMMENT '所属部门ID',
  `valid` bit(1) NOT NULL DEFAULT b'1' COMMENT '是否生效',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_department` (`department_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='应用系统';

-- ----------------------------
-- Records of application
-- ----------------------------
BEGIN;
INSERT INTO `application` (`id`, `name`, `department_id`, `valid`, `create_time`, `update_time`) VALUES (1, '网格通', 1, b'1', '2024-04-29 09:43:47', '2024-04-29 09:43:47');
INSERT INTO `application` (`id`, `name`, `department_id`, `valid`, `create_time`, `update_time`) VALUES (2, '测试应用', 1, b'1', '2024-05-08 17:23:47', '2024-05-08 17:41:21');
COMMIT;

-- ----------------------------
-- Table structure for capture_schedule
-- ----------------------------
DROP TABLE IF EXISTS `capture_schedule`;
CREATE TABLE `capture_schedule` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称',
  `script_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '数据清洗脚本，为空则不清洗',
  `script_language` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '脚本语言，暂仅支持JS',
  `cron` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行周期，cron表达式',
  `remote_resource_id` int NOT NULL COMMENT '数据源位置ID',
  `center_resource_id` int NOT NULL COMMENT '中心库位置ID',
  `valid` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否生效',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_center_resource` (`center_resource_id`) USING BTREE,
  KEY `idx_remote_resource` (`remote_resource_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='数据获取任务';

-- ----------------------------
-- Records of capture_schedule
-- ----------------------------
BEGIN;
INSERT INTO `capture_schedule` (`id`, `name`, `script_content`, `script_language`, `cron`, `remote_resource_id`, `center_resource_id`, `valid`, `create_time`, `update_time`) VALUES (1, '测试任务', 'function test(aaa) {\r\n    return aaa; // 123\r\n}', 'js', '1 * * * * ?', 3, 2, b'0', '2024-05-07 09:35:12', '2024-05-10 17:46:02');
INSERT INTO `capture_schedule` (`id`, `name`, `script_content`, `script_language`, `cron`, `remote_resource_id`, `center_resource_id`, `valid`, `create_time`, `update_time`) VALUES (2, '抓网格通文章', 'function t(jsonStr) {\r\n    return jsonStr;\r\n}', 'js', '1 * * * * ?', 1, 3, b'0', '2024-05-08 16:14:42', '2024-05-10 17:43:45');
INSERT INTO `capture_schedule` (`id`, `name`, `script_content`, `script_language`, `cron`, `remote_resource_id`, `center_resource_id`, `valid`, `create_time`, `update_time`) VALUES (3, '抓取家庭信息', 'function t(a) {\r\n    return a;\r\n}', 'js', '0 0 * * * ?', 5, 4, b'0', '2024-05-10 16:48:19', '2024-05-10 16:50:52');
COMMIT;

-- ----------------------------
-- Table structure for capture_schedule_record
-- ----------------------------
DROP TABLE IF EXISTS `capture_schedule_record`;
CREATE TABLE `capture_schedule_record` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `schedule_id` int NOT NULL COMMENT '任务ID',
  `status` int NOT NULL DEFAULT '1' COMMENT '状态：1-执行中 2-成功 3-失败',
  `fail_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '失败原因',
  `fail_stacktrace` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '异常堆栈信息',
  `start_time` datetime NOT NULL COMMENT '执行开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '执行结束时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_schedule` (`schedule_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='数据获取任务执行记录';

-- ----------------------------
-- Records of capture_schedule_record
-- ----------------------------
BEGIN;
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (1, 1, 2, NULL, NULL, '2024-05-09 11:45:01', '2024-05-09 11:45:01', '2024-05-09 11:45:01', '2024-05-09 11:45:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (2, 2, 2, NULL, NULL, '2024-05-09 11:45:01', '2024-05-09 11:45:01', '2024-05-09 11:45:01', '2024-05-09 11:45:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (3, 1, 2, NULL, NULL, '2024-05-09 11:46:01', '2024-05-09 11:46:01', '2024-05-09 11:46:01', '2024-05-09 11:46:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (4, 2, 2, NULL, NULL, '2024-05-09 11:46:01', '2024-05-09 11:46:01', '2024-05-09 11:46:01', '2024-05-09 11:46:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (5, 1, 2, NULL, NULL, '2024-05-09 11:47:01', '2024-05-09 11:47:01', '2024-05-09 11:47:01', '2024-05-09 11:47:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (6, 2, 2, NULL, NULL, '2024-05-09 11:47:01', '2024-05-09 11:47:01', '2024-05-09 11:47:01', '2024-05-09 11:47:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (7, 2, 3, 'Index 0 out of bounds for length 0', '[java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64), java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70), java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248), java.base/java.util.Objects.checkIndex(Objects.java:372), java.base/java.util.ArrayList.get(ArrayList.java:459), com.cskj.datacenter.admin.internal.task.DataCaptureTask.writeCenterDatabase(DataCaptureTask.java:217), com.cskj.datacenter.admin.internal.task.DataCaptureTask.captureAction(DataCaptureTask.java:136), com.cskj.datacenter.admin.internal.task.DataCaptureTask.run(DataCaptureTask.java:65), org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54), org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95), java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515), java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264), java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), java.base/java.lang.Thread.run(Thread.java:829)]', '2024-05-10 16:19:01', '2024-05-10 16:19:02', '2024-05-10 16:19:01', '2024-05-10 16:19:02');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (8, 2, 2, NULL, NULL, '2024-05-10 16:25:01', '2024-05-10 16:25:02', '2024-05-10 16:25:01', '2024-05-10 16:25:02');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (9, 3, 2, NULL, NULL, '2024-05-10 16:49:01', '2024-05-10 17:45:16', '2024-05-10 16:49:01', '2024-05-10 17:45:16');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (10, 1, 2, NULL, NULL, '2024-05-10 17:03:01', '2024-05-10 17:03:04', '2024-05-10 17:03:01', '2024-05-10 17:03:04');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (11, 1, 2, NULL, NULL, '2024-05-10 17:04:01', '2024-05-10 17:04:01', '2024-05-10 17:04:01', '2024-05-10 17:04:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (12, 1, 2, NULL, NULL, '2024-05-10 17:05:01', '2024-05-10 17:05:01', '2024-05-10 17:05:01', '2024-05-10 17:05:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (13, 1, 2, NULL, NULL, '2024-05-10 17:06:01', '2024-05-10 17:06:01', '2024-05-10 17:06:01', '2024-05-10 17:06:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (14, 1, 2, NULL, NULL, '2024-05-10 17:07:01', '2024-05-10 17:07:01', '2024-05-10 17:07:01', '2024-05-10 17:07:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (15, 1, 2, NULL, NULL, '2024-05-10 17:08:01', '2024-05-10 17:08:07', '2024-05-10 17:08:01', '2024-05-10 17:08:07');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (16, 1, 2, NULL, NULL, '2024-05-10 17:09:01', '2024-05-10 17:09:01', '2024-05-10 17:09:01', '2024-05-10 17:09:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (17, 1, 2, NULL, NULL, '2024-05-10 17:10:01', '2024-05-10 17:10:02', '2024-05-10 17:10:01', '2024-05-10 17:10:02');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (18, 1, 2, NULL, NULL, '2024-05-10 17:11:01', '2024-05-10 17:11:01', '2024-05-10 17:11:01', '2024-05-10 17:11:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (19, 1, 2, NULL, NULL, '2024-05-10 17:12:01', '2024-05-10 17:12:01', '2024-05-10 17:12:01', '2024-05-10 17:12:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (20, 1, 2, NULL, NULL, '2024-05-10 17:13:01', '2024-05-10 17:13:01', '2024-05-10 17:13:01', '2024-05-10 17:13:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (21, 1, 2, NULL, NULL, '2024-05-10 17:14:01', '2024-05-10 17:14:01', '2024-05-10 17:14:01', '2024-05-10 17:14:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (22, 1, 2, NULL, NULL, '2024-05-10 17:15:01', '2024-05-10 17:15:02', '2024-05-10 17:15:01', '2024-05-10 17:15:02');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (23, 1, 2, NULL, NULL, '2024-05-10 17:16:01', '2024-05-10 17:16:01', '2024-05-10 17:16:01', '2024-05-10 17:16:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (24, 1, 2, NULL, NULL, '2024-05-10 17:17:01', '2024-05-10 17:17:02', '2024-05-10 17:17:01', '2024-05-10 17:17:02');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (25, 1, 2, NULL, NULL, '2024-05-10 17:18:01', '2024-05-10 17:18:04', '2024-05-10 17:18:01', '2024-05-10 17:18:04');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (26, 1, 2, NULL, NULL, '2024-05-10 17:19:01', '2024-05-10 17:19:02', '2024-05-10 17:19:01', '2024-05-10 17:19:02');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (27, 1, 2, NULL, NULL, '2024-05-10 17:20:01', '2024-05-10 17:20:05', '2024-05-10 17:20:01', '2024-05-10 17:20:05');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (28, 1, 2, NULL, NULL, '2024-05-10 17:21:01', '2024-05-10 17:21:03', '2024-05-10 17:21:01', '2024-05-10 17:21:03');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (29, 1, 2, NULL, NULL, '2024-05-10 17:22:01', '2024-05-10 17:22:01', '2024-05-10 17:22:01', '2024-05-10 17:22:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (30, 1, 2, NULL, NULL, '2024-05-10 17:23:01', '2024-05-10 17:23:01', '2024-05-10 17:23:01', '2024-05-10 17:23:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (31, 1, 2, NULL, NULL, '2024-05-10 17:24:01', '2024-05-10 17:24:01', '2024-05-10 17:24:01', '2024-05-10 17:24:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (32, 1, 2, NULL, NULL, '2024-05-10 17:25:01', '2024-05-10 17:25:02', '2024-05-10 17:25:01', '2024-05-10 17:25:02');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (33, 1, 2, NULL, NULL, '2024-05-10 17:26:01', '2024-05-10 17:26:01', '2024-05-10 17:26:01', '2024-05-10 17:26:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (34, 1, 2, NULL, NULL, '2024-05-10 17:27:01', '2024-05-10 17:27:01', '2024-05-10 17:27:01', '2024-05-10 17:27:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (35, 1, 2, NULL, NULL, '2024-05-10 17:28:01', '2024-05-10 17:28:01', '2024-05-10 17:28:01', '2024-05-10 17:28:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (36, 1, 2, NULL, NULL, '2024-05-10 17:29:01', '2024-05-10 17:29:01', '2024-05-10 17:29:01', '2024-05-10 17:29:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (37, 1, 2, NULL, NULL, '2024-05-10 17:30:01', '2024-05-10 17:30:01', '2024-05-10 17:30:01', '2024-05-10 17:30:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (38, 1, 2, NULL, NULL, '2024-05-10 17:31:01', '2024-05-10 17:31:01', '2024-05-10 17:31:01', '2024-05-10 17:31:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (39, 1, 2, NULL, NULL, '2024-05-10 17:32:01', '2024-05-10 17:32:01', '2024-05-10 17:32:01', '2024-05-10 17:32:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (40, 1, 2, NULL, NULL, '2024-05-10 17:33:01', '2024-05-10 17:33:01', '2024-05-10 17:33:01', '2024-05-10 17:33:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (41, 1, 2, NULL, NULL, '2024-05-10 17:34:01', '2024-05-10 17:34:01', '2024-05-10 17:34:01', '2024-05-10 17:34:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (42, 1, 2, NULL, NULL, '2024-05-10 17:35:01', '2024-05-10 17:35:01', '2024-05-10 17:35:01', '2024-05-10 17:35:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (43, 1, 2, NULL, NULL, '2024-05-10 17:36:01', '2024-05-10 17:36:02', '2024-05-10 17:36:01', '2024-05-10 17:36:02');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (44, 1, 2, NULL, NULL, '2024-05-10 17:37:01', '2024-05-10 17:37:01', '2024-05-10 17:37:01', '2024-05-10 17:37:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (45, 1, 2, NULL, NULL, '2024-05-10 17:38:01', '2024-05-10 17:38:01', '2024-05-10 17:38:01', '2024-05-10 17:38:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (46, 1, 2, NULL, NULL, '2024-05-10 17:39:01', '2024-05-10 17:39:01', '2024-05-10 17:39:01', '2024-05-10 17:39:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (47, 1, 2, NULL, NULL, '2024-05-10 17:40:01', '2024-05-10 17:40:01', '2024-05-10 17:40:01', '2024-05-10 17:40:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (48, 1, 2, NULL, NULL, '2024-05-10 17:41:01', '2024-05-10 17:41:01', '2024-05-10 17:41:01', '2024-05-10 17:41:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (49, 1, 2, NULL, NULL, '2024-05-10 17:42:01', '2024-05-10 17:42:01', '2024-05-10 17:42:01', '2024-05-10 17:42:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (50, 1, 3, '中心数据源不存在或已禁用', '[com.cskj.datacenter.admin.common.excption.ScheduledTaskException.of(ScheduledTaskException.java:35), com.cskj.datacenter.admin.internal.task.DataCaptureTask.captureAction(DataCaptureTask.java:108), com.cskj.datacenter.admin.internal.task.DataCaptureTask.run(DataCaptureTask.java:65), org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54), org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95), java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515), java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264), java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), java.base/java.lang.Thread.run(Thread.java:829)]', '2024-05-10 17:43:01', '2024-05-10 17:43:01', '2024-05-10 17:43:01', '2024-05-10 17:43:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (51, 1, 3, '中心数据源不存在或已禁用', '[com.cskj.datacenter.admin.common.excption.ScheduledTaskException.of(ScheduledTaskException.java:35), com.cskj.datacenter.admin.internal.task.DataCaptureTask.captureAction(DataCaptureTask.java:108), com.cskj.datacenter.admin.internal.task.DataCaptureTask.run(DataCaptureTask.java:65), org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54), org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95), java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515), java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264), java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), java.base/java.lang.Thread.run(Thread.java:829)]', '2024-05-10 17:44:01', '2024-05-10 17:44:01', '2024-05-10 17:44:01', '2024-05-10 17:44:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (52, 1, 3, '中心数据源不存在或已禁用', '[com.cskj.datacenter.admin.common.excption.ScheduledTaskException.of(ScheduledTaskException.java:35), com.cskj.datacenter.admin.internal.task.DataCaptureTask.captureAction(DataCaptureTask.java:108), com.cskj.datacenter.admin.internal.task.DataCaptureTask.run(DataCaptureTask.java:65), org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54), org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95), java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515), java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264), java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), java.base/java.lang.Thread.run(Thread.java:829)]', '2024-05-10 17:45:01', '2024-05-10 17:45:01', '2024-05-10 17:45:01', '2024-05-10 17:45:01');
INSERT INTO `capture_schedule_record` (`id`, `schedule_id`, `status`, `fail_message`, `fail_stacktrace`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (53, 1, 3, '中心数据源不存在或已禁用', '[com.cskj.datacenter.admin.common.excption.ScheduledTaskException.of(ScheduledTaskException.java:35), com.cskj.datacenter.admin.internal.task.DataCaptureTask.captureAction(DataCaptureTask.java:108), com.cskj.datacenter.admin.internal.task.DataCaptureTask.run(DataCaptureTask.java:65), org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54), org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95), java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515), java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264), java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), java.base/java.lang.Thread.run(Thread.java:829)]', '2024-05-10 17:46:01', '2024-05-10 17:46:01', '2024-05-10 17:46:01', '2024-05-10 17:46:01');
COMMIT;

-- ----------------------------
-- Table structure for center_resource
-- ----------------------------
DROP TABLE IF EXISTS `center_resource`;
CREATE TABLE `center_resource` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述',
  `type` int NOT NULL COMMENT '类型：1-文件 2-mysql库表',
  `file_path` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件路径（跟库表二选一）',
  `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '表名',
  `valid` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否生效',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_file_path` (`file_path`) USING BTREE,
  KEY `idx_table_name` (`table_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='中心库资源';

-- ----------------------------
-- Records of center_resource
-- ----------------------------
BEGIN;
INSERT INTO `center_resource` (`id`, `name`, `description`, `type`, `file_path`, `table_name`, `valid`, `create_time`, `update_time`) VALUES (2, '测试', 'https://github.com/codemirror/theme-one-dark', 1, '/data/attachment/datacenter/center_resource/text.json', '', b'0', '2024-04-30 16:09:14', '2024-05-09 15:45:26');
INSERT INTO `center_resource` (`id`, `name`, `description`, `type`, `file_path`, `table_name`, `valid`, `create_time`, `update_time`) VALUES (3, 'grid_article', '测试数据库', 2, '', 'grid_article', b'1', '2024-05-08 16:08:12', '2024-05-08 16:08:12');
INSERT INTO `center_resource` (`id`, `name`, `description`, `type`, `file_path`, `table_name`, `valid`, `create_time`, `update_time`) VALUES (4, '网格通-家庭信息', '网格通-家庭信息', 2, '', 'grid_house_info', b'1', '2024-05-10 16:47:20', '2024-05-10 16:47:20');
COMMIT;

-- ----------------------------
-- Table structure for department
-- ----------------------------
DROP TABLE IF EXISTS `department`;
CREATE TABLE `department` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `parent_id` int DEFAULT NULL COMMENT '父节点ID，根节点为空',
  `level` int NOT NULL COMMENT '层级，根节点为0',
  `valid` bit(1) NOT NULL DEFAULT b'1' COMMENT '是否生效',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_parent` (`parent_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='部门';

-- ----------------------------
-- Records of department
-- ----------------------------
BEGIN;
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (1, '大部门', NULL, 0, b'1', '2024-04-23 16:32:41', '2024-04-23 16:32:41');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (16, '测试', NULL, 0, b'1', '2024-04-24 10:40:40', '2024-04-24 10:40:40');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (17, '测试1', 16, 1, b'1', '2024-04-24 10:40:53', '2024-04-24 10:40:53');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (18, '测试2', 16, 1, b'1', '2024-04-29 15:26:03', '2024-04-29 15:26:03');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (19, '测试3', 16, 1, b'0', '2024-05-10 11:44:16', '2024-05-10 11:44:16');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (20, 'test', NULL, 0, b'1', '2024-10-15 18:04:28', '2024-10-15 18:04:28');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (21, 'test1', 20, 1, b'1', '2024-10-15 18:05:27', '2024-10-15 18:05:27');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (22, 'test2', 20, 1, b'1', '2024-10-16 07:45:38', '2024-10-16 07:45:38');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (24, 'tester1', 23, 1, b'1', '2024-10-16 07:47:56', '2024-10-16 07:47:56');
INSERT INTO `department` (`id`, `name`, `parent_id`, `level`, `valid`, `create_time`, `update_time`) VALUES (25, 'tester11', 24, 2, b'1', '2024-10-16 07:48:18', '2024-10-16 07:48:18');
COMMIT;

-- ----------------------------
-- Table structure for dict_data
-- ----------------------------
DROP TABLE IF EXISTS `dict_data`;
CREATE TABLE `dict_data` (
  `id` int NOT NULL AUTO_INCREMENT,
  `dict_sort` int NOT NULL DEFAULT '1' COMMENT '字典排序',
  `dict_label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典标签',
  `dict_value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典键值',
  `dict_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典类型',
  `status` int DEFAULT '1' COMMENT '状态（1正常 0停用）',
  `del` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '1=删除，0=否',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='字典值';

-- ----------------------------
-- Records of dict_data
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dict_type
-- ----------------------------
DROP TABLE IF EXISTS `dict_type`;
CREATE TABLE `dict_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `dict_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典名称',
  `dict_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典类型',
  `dict_sort` int DEFAULT '1' COMMENT '字典排序',
  `status` int DEFAULT '1' COMMENT '状态（1正常 0停用）',
  `del` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '1=删除,0=否',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '添加时间',
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `dict_type` (`dict_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='字典类型';

-- ----------------------------
-- Records of dict_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for index_center_resource
-- ----------------------------
DROP TABLE IF EXISTS `index_center_resource`;
CREATE TABLE `index_center_resource` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `index_id` int NOT NULL COMMENT '资源目录ID',
  `center_resource_id` int NOT NULL COMMENT '中心库资源ID',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_index_resource` (`index_id`,`center_resource_id`) USING BTREE,
  UNIQUE KEY `idx_resource_index` (`center_resource_id`,`index_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='目录关联中心库';

-- ----------------------------
-- Records of index_center_resource
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for index_code_config
-- ----------------------------
DROP TABLE IF EXISTS `index_code_config`;
CREATE TABLE `index_code_config` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `level` int NOT NULL COMMENT '层级',
  `length` int NOT NULL COMMENT '编码位数',
  `from_value` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码起始',
  `to_value` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码截止（包含）',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_level` (`level`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='目录编码规则';

-- ----------------------------
-- Records of index_code_config
-- ----------------------------
BEGIN;
INSERT INTO `index_code_config` (`id`, `level`, `length`, `from_value`, `to_value`, `create_time`, `update_time`) VALUES (1, 1, 1, '0', '9', '2024-05-22 16:26:42', '2024-05-24 15:32:32');
INSERT INTO `index_code_config` (`id`, `level`, `length`, `from_value`, `to_value`, `create_time`, `update_time`) VALUES (2, 2, 2, '00', '99', '2024-05-22 16:27:28', '2024-05-22 16:27:28');
INSERT INTO `index_code_config` (`id`, `level`, `length`, `from_value`, `to_value`, `create_time`, `update_time`) VALUES (3, 3, 3, '000', '999', '2024-05-22 16:27:36', '2024-05-22 16:27:36');
INSERT INTO `index_code_config` (`id`, `level`, `length`, `from_value`, `to_value`, `create_time`, `update_time`) VALUES (4, 4, 4, '0000', '9999', '2024-05-22 16:27:59', '2024-05-24 11:24:15');
COMMIT;

-- ----------------------------
-- Table structure for index_code_temp
-- ----------------------------
DROP TABLE IF EXISTS `index_code_temp`;
CREATE TABLE `index_code_temp` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '模板名称',
  `cate_start` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类起始',
  `cate_end` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类结束',
  `cate_length` int DEFAULT NULL COMMENT '类长度',
  `item_start` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '项起始',
  `item_end` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '项结束',
  `item_length` int DEFAULT NULL COMMENT '项长度',
  `target_start` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '目起始',
  `target_end` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '目结束',
  `target_length` int DEFAULT NULL COMMENT '目长度',
  `detail_length` int DEFAULT NULL COMMENT '细目长度',
  `detail_start` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '细目起始',
  `detail_end` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '细目结束',
  `status` int DEFAULT '1' COMMENT '状态（1：启用 2：停用）',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '说明',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='目录编码模板';

-- ----------------------------
-- Records of index_code_temp
-- ----------------------------
BEGIN;
INSERT INTO `index_code_temp` (`id`, `name`, `cate_start`, `cate_end`, `cate_length`, `item_start`, `item_end`, `item_length`, `target_start`, `target_end`, `target_length`, `detail_length`, `detail_start`, `detail_end`, `status`, `description`, `create_time`, `update_time`) VALUES (2, '测试模板名称', '1', '9', 1, '01', '99', 2, '001', '999', 3, 4, '0001', '9999', 1, '测试', '2024-06-05 17:59:13', '2024-06-06 15:24:12');
COMMIT;

-- ----------------------------
-- Table structure for index_tag
-- ----------------------------
DROP TABLE IF EXISTS `index_tag`;
CREATE TABLE `index_tag` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '标签名称',
  `res_id` int DEFAULT NULL COMMENT '所属资源目录id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='目录标签表';

-- ----------------------------
-- Records of index_tag
-- ----------------------------
BEGIN;
INSERT INTO `index_tag` (`id`, `name`, `res_id`, `create_time`, `update_time`) VALUES (3, '测试2', 4, '2024-06-06 10:32:07', '2024-06-06 10:32:07');
INSERT INTO `index_tag` (`id`, `name`, `res_id`, `create_time`, `update_time`) VALUES (4, '测试3', 4, '2024-06-06 10:32:07', '2024-06-06 10:32:07');
INSERT INTO `index_tag` (`id`, `name`, `res_id`, `create_time`, `update_time`) VALUES (10, '测试2', 7, '2024-06-12 08:36:29', '2024-06-12 08:36:29');
INSERT INTO `index_tag` (`id`, `name`, `res_id`, `create_time`, `update_time`) VALUES (18, '测试1', 6, '2024-06-12 09:03:01', '2024-06-12 09:03:01');
INSERT INTO `index_tag` (`id`, `name`, `res_id`, `create_time`, `update_time`) VALUES (20, '测试3', 6, '2024-06-12 09:03:23', '2024-06-12 09:03:23');
INSERT INTO `index_tag` (`id`, `name`, `res_id`, `create_time`, `update_time`) VALUES (21, '测试3', 8, '2024-06-12 09:03:23', '2024-06-12 09:03:23');
COMMIT;

-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单名称',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '菜单路径',
  `parent_id` int DEFAULT NULL COMMENT '上级菜单ID，空表示根节点',
  `sort_weight` int NOT NULL DEFAULT '0' COMMENT '同级排序权重，从小到大',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `icon` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图标字符串',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_parent` (`parent_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='菜单';

-- ----------------------------
-- Records of menu
-- ----------------------------
BEGIN;
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (1, '配置', '/system', NULL, 999, '2024-04-23 16:23:22', '2025-02-21 03:41:33', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (2, '用户管理', '/system/usersManage', 1, 1, '2024-04-23 16:23:54', '2024-04-23 16:23:54', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (3, '角色管理', '/system/rolesManage', 1, 2, '2024-04-23 16:24:32', '2024-04-23 16:24:32', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (4, '菜单管理', '/system/menusManage', 1, 3, '2024-04-23 16:24:46', '2025-02-21 04:05:47', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (5, '首页', '/', NULL, 1, '2024-04-23 16:25:57', '2024-04-23 16:25:57', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (6, '仪表盘', '/dashboard', 5, 1, '2024-04-23 16:26:18', '2024-04-23 16:26:18', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (7, '部门管理', '/system/deptManage', 1, 1, '2024-04-23 16:26:58', '2024-04-29 15:19:44', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (8, '数据管理:iconify图标', '/dataManage', NULL, 1, '2024-04-24 16:38:33', '2025-05-28 02:27:48', '');
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (12, '测试', '/test', NULL, 1, '2024-04-29 11:10:05', '2024-04-29 11:10:05', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (16, '应用系统管理:el-icon图标', '/appManage', NULL, 1, '2024-05-08 17:19:07', '2025-05-28 00:54:01', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (17, '应用系统管理:el-icon图标', '/appManage/appManage', 16, 1, '2024-05-08 17:19:19', '2025-05-28 00:54:11', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (18, '资源目录管理:iconify图标', '', 8, 1, '2024-05-13 09:38:48', '2025-05-28 02:27:54', 'iconify:material-symbols:folder-rounded');
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (19, '目录管理', NULL, 18, 1, '2024-05-13 09:52:12', '2024-05-13 09:52:12', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (21, '其他配置', NULL, 18, 1, '2024-05-13 09:54:28', '2024-05-13 09:54:28', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (22, '目录分类配置', '/dataManage/directoryManage', 19, 1, '2024-05-13 10:23:03', '2024-06-06 15:54:50', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (23, '数据资源归集', '/dataManage/remoteGroupManage', 19, 1, '2024-05-13 10:24:05', '2024-05-14 17:18:00', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (24, '信息项', '/dataManage/centerManage', 21, 1, '2024-05-13 10:25:34', '2024-05-13 10:25:34', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (33, '设备资产管理', '/equipmentManage/EquipmentManage', 32, 1, '2024-08-05 09:06:14', '2024-08-05 09:09:54', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (34, 'test1', '/test', NULL, 1, '2024-10-16 16:03:06', '2024-10-16 16:03:29', NULL);
INSERT INTO `menu` (`id`, `name`, `path`, `parent_id`, `sort_weight`, `create_time`, `update_time`, `icon`) VALUES (36, '（ai测试）远程资源管理', '/dataManage/remoteSourceManage', 8, 1, '2025-02-08 17:43:00', '2025-02-08 17:43:00', NULL);
COMMIT;

-- ----------------------------
-- Table structure for remote_resource
-- ----------------------------
DROP TABLE IF EXISTS `remote_resource`;
CREATE TABLE `remote_resource` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `type` int NOT NULL COMMENT '类型：1-文件 2-库表 3-接口 4-消息',
  `file_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件下载地址',
  `file_source_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '文件源类型：HTTP/FTP',
  `ftp_username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'FTP用户名',
  `ftp_password` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'FTP密码',
  `db_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '数据库连接地址',
  `db_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '库名',
  `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '表名',
  `db_username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '数据库用户名',
  `db_password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '数据库密码',
  `http_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '接口地址',
  `http_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '接口请求方式：GET/POST',
  `content_type` int DEFAULT NULL COMMENT '内容类型：1-application/json 2-application/x-www-form-urlencoded 3-multipart/form-data',
  `http_body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求体，统一按json格式存储',
  `application_id` int NOT NULL COMMENT '应用系统ID',
  `description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '摘要',
  `classified_type` int NOT NULL COMMENT '涉密属性：1-涉密信息 2-公开信息',
  `group_id` int DEFAULT NULL COMMENT '归集ID',
  `valid` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否生效',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_application` (`application_id`) USING BTREE,
  KEY `idx_group` (`group_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='三方数据来源';

-- ----------------------------
-- Records of remote_resource
-- ----------------------------
BEGIN;
INSERT INTO `remote_resource` (`id`, `name`, `type`, `file_url`, `file_source_type`, `ftp_username`, `ftp_password`, `db_url`, `db_name`, `table_name`, `db_username`, `db_password`, `http_url`, `http_type`, `content_type`, `http_body`, `application_id`, `description`, `classified_type`, `group_id`, `valid`, `create_time`, `update_time`) VALUES (1, '指挥中心-文章信息', 2, NULL, NULL, NULL, NULL, 'jdbc:mysql://172.16.10.161:13307/grid?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&useSSL=false', 'grid', 'article', 'tieshangang', 'L6f3nC1hpEhU67PAAoZ7pHSwstCdbuq/uLIk/hW2iig=', NULL, NULL, NULL, '', 1, '指挥中心-文章信息', 1, NULL, b'1', '2024-04-28 10:31:55', '2024-05-08 16:13:21');
INSERT INTO `remote_resource` (`id`, `name`, `type`, `file_url`, `file_source_type`, `ftp_username`, `ftp_password`, `db_url`, `db_name`, `table_name`, `db_username`, `db_password`, `http_url`, `http_type`, `content_type`, `http_body`, `application_id`, `description`, `classified_type`, `group_id`, `valid`, `create_time`, `update_time`) VALUES (3, '涉密接口', 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'http://172.16.10.161:12801/admin/doc.html#/%E5%85%A8%E9%83%A8/%E8%BF%9C%E7%A8%8B%E6%95%B0%E6%8D%AE%E6%BA%90%E7%AE%A1%E7%90%86/save_4', 'GET', 3, '{  \n  \"id\": 0,  \n  \"name\": \"示例名称\",  \n  \"type\": 0,  \n  \"fileUrl\": \"https://example.com/file.zip\",  \n  \"dbUrl\": \"jdbc:mysql://example.com:3306/mydb\",  \n  \"dbName\": \"mydb\",  \n  \"tableName\": \"mytable\",  \n  \"dbUsername\": \"username\",  \n  \"dbPassword\": \"password\",  \n  \"httpUrl\": \"https://api.example.com/endpoint\",  \n  \"httpType\": \"GET\",  \n  \"contentType\": 1,  \n  \"httpBody\": \"{\\\"key1\\\":\\\"value1\\\", \\\"key2\\\":\\\"value2\\\"}\",  \n  \"supplierId\": 123,  \n  \"description\": \"这是一段描述信息\",  \n  \"classifiedType\": 1,  \n  \"valid\": true  \n}', 2, '涉密接口', 1, NULL, b'1', '2024-04-28 11:09:47', '2024-05-08 18:08:07');
INSERT INTO `remote_resource` (`id`, `name`, `type`, `file_url`, `file_source_type`, `ftp_username`, `ftp_password`, `db_url`, `db_name`, `table_name`, `db_username`, `db_password`, `http_url`, `http_type`, `content_type`, `http_body`, `application_id`, `description`, `classified_type`, `group_id`, `valid`, `create_time`, `update_time`) VALUES (4, '涉密ftp', 1, 'https://element-plus.org/zh-CN/component/link.html', 'FTP', 'root', 'vlV5CfSfQT6PxO0kh9RreQ==', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '涉密ftp', 1, NULL, b'0', '2024-04-28 11:55:41', '2024-04-28 11:58:38');
INSERT INTO `remote_resource` (`id`, `name`, `type`, `file_url`, `file_source_type`, `ftp_username`, `ftp_password`, `db_url`, `db_name`, `table_name`, `db_username`, `db_password`, `http_url`, `http_type`, `content_type`, `http_body`, `application_id`, `description`, `classified_type`, `group_id`, `valid`, `create_time`, `update_time`) VALUES (5, '网格通-家庭信息', 2, NULL, NULL, NULL, NULL, 'jdbc:mysql://172.16.10.161:13307/grid?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&useSSL=false', 'grid', 'house_info', 'tieshangang', 'L6f3nC1hpEhU67PAAoZ7pHSwstCdbuq/uLIk/hW2iig=', NULL, NULL, NULL, NULL, 1, '网格通家庭信息表', 1, NULL, b'1', '2024-05-10 16:45:23', '2024-05-10 16:45:23');
COMMIT;

-- ----------------------------
-- Table structure for remote_resource_group
-- ----------------------------
DROP TABLE IF EXISTS `remote_resource_group`;
CREATE TABLE `remote_resource_group` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='三方数据源归集';

-- ----------------------------
-- Records of remote_resource_group
-- ----------------------------
BEGIN;
INSERT INTO `remote_resource_group` (`id`, `name`, `create_time`, `update_time`) VALUES (1, '测试归集', '2024-04-29 16:22:43', '2024-04-29 16:22:43');
COMMIT;

-- ----------------------------
-- Table structure for resource_index
-- ----------------------------
DROP TABLE IF EXISTS `resource_index`;
CREATE TABLE `resource_index` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `code` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资源代码',
  `level` int NOT NULL COMMENT '层级，最高四级',
  `parent_id` int DEFAULT NULL COMMENT '父节点ID',
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资源名称',
  `description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '资源摘要',
  `valid` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否启用',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `dept_id` int DEFAULT NULL COMMENT '资源提供方(所属部门)',
  `relation_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '关联资源代码',
  `code_temp_id` int DEFAULT NULL COMMENT '所属编码模板',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_parent` (`parent_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='资源目录';

-- ----------------------------
-- Records of resource_index
-- ----------------------------
BEGIN;
INSERT INTO `resource_index` (`id`, `code`, `level`, `parent_id`, `name`, `description`, `valid`, `create_time`, `update_time`, `dept_id`, `relation_code`, `code_temp_id`) VALUES (3, '1', 1, NULL, '测', NULL, b'1', '2024-05-22 17:16:59', '2024-05-22 17:16:59', 2, '1-23-23,1-02-033', 2);
INSERT INTO `resource_index` (`id`, `code`, `level`, `parent_id`, `name`, `description`, `valid`, `create_time`, `update_time`, `dept_id`, `relation_code`, `code_temp_id`) VALUES (4, '1-22', 2, 3, '测试1', '小娃达到', b'1', '2024-04-30 15:48:32', '2024-04-30 15:48:32', 3, '1-01-001,1-02-003', 2);
INSERT INTO `resource_index` (`id`, `code`, `level`, `parent_id`, `name`, `description`, `valid`, `create_time`, `update_time`, `dept_id`, `relation_code`, `code_temp_id`) VALUES (5, '1-22-333-4444', 3, 4, '测试1-1', '', b'1', '2024-06-06 17:52:44', '2024-06-06 17:53:41', NULL, NULL, NULL);
INSERT INTO `resource_index` (`id`, `code`, `level`, `parent_id`, `name`, `description`, `valid`, `create_time`, `update_time`, `dept_id`, `relation_code`, `code_temp_id`) VALUES (6, '1-11-111-1111', 4, 5, '测试1-1-1', '测试仪', b'1', '2024-06-06 17:53:21', '2024-06-18 16:08:44', 17, '1-11-111-1111', 2);
INSERT INTO `resource_index` (`id`, `code`, `level`, `parent_id`, `name`, `description`, `valid`, `create_time`, `update_time`, `dept_id`, `relation_code`, `code_temp_id`) VALUES (7, '1-11-111-2222', 4, 5, '测试1-1-2', '', b'1', '2024-06-07 15:36:57', '2024-06-07 15:37:09', NULL, NULL, NULL);
INSERT INTO `resource_index` (`id`, `code`, `level`, `parent_id`, `name`, `description`, `valid`, `create_time`, `update_time`, `dept_id`, `relation_code`, `code_temp_id`) VALUES (8, '1-11-111-3333', 4, 5, '测试1-11-3', '', b'1', '2024-06-07 15:37:36', '2024-06-07 15:37:42', NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '角色描述',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='角色';

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` (`id`, `name`, `description`, `create_time`, `update_time`) VALUES (1, '超级管理员', '超级管理员', '2024-04-23 16:20:32', '2025-02-08 18:02:01');
INSERT INTO `role` (`id`, `name`, `description`, `create_time`, `update_time`) VALUES (2, '测试的', '测试的', '2024-10-16 11:57:22', '2025-02-20 09:33:50');
COMMIT;

-- ----------------------------
-- Table structure for role_menu
-- ----------------------------
DROP TABLE IF EXISTS `role_menu`;
CREATE TABLE `role_menu` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `role_id` int NOT NULL COMMENT '角色ID',
  `menu_id` int NOT NULL COMMENT '菜单ID',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_role_menu` (`role_id`,`menu_id`) USING BTREE,
  KEY `idx_menu` (`menu_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=362 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='角色关联菜单';

-- ----------------------------
-- Records of role_menu
-- ----------------------------
BEGIN;
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (283, 1, 5, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (284, 1, 6, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (285, 1, 8, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (286, 1, 18, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (287, 1, 19, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (288, 1, 22, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (289, 1, 23, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (290, 1, 21, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (291, 1, 24, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (292, 1, 16, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (293, 1, 17, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (294, 1, 1, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (295, 1, 2, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (296, 1, 7, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (297, 1, 3, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (298, 1, 4, '2025-02-08 18:02:02', '2025-02-08 18:02:02');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (355, 2, 1, '2025-02-20 09:33:50', '2025-02-20 09:33:50');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (356, 2, 4, '2025-02-20 09:33:50', '2025-02-20 09:33:50');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (357, 2, 3, '2025-02-20 09:33:50', '2025-02-20 09:33:50');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (358, 2, 2, '2025-02-20 09:33:50', '2025-02-20 09:33:50');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (359, 2, 7, '2025-02-20 09:33:50', '2025-02-20 09:33:50');
INSERT INTO `role_menu` (`id`, `role_id`, `menu_id`, `create_time`, `update_time`) VALUES (360, 2, 12, '2025-02-20 09:33:50', '2025-02-20 09:33:50');
COMMIT;

-- ----------------------------
-- Table structure for upload_file
-- ----------------------------
DROP TABLE IF EXISTS `upload_file`;
CREATE TABLE `upload_file` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `bucket` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '桶（项目）',
  `path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件路径',
  `type` int unsigned NOT NULL COMMENT '文件类型：1-图片 2-视频 3-音频 4-Word文档 5-PDF 99-其他',
  `name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件名',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `uploader_id` int unsigned DEFAULT NULL COMMENT '上传者id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='上传的文件';

-- ----------------------------
-- Records of upload_file
-- ----------------------------
BEGIN;
INSERT INTO `upload_file` (`id`, `bucket`, `path`, `type`, `name`, `remark`, `uploader_id`, `create_time`, `update_time`) VALUES (14, 'common', 'static/common/660b6133daa40ed86605eeda720c154e', 1, 'akuya.jpeg', '', 3, '2025-02-25 08:21:31', '2025-02-25 08:21:31');
INSERT INTO `upload_file` (`id`, `bucket`, `path`, `type`, `name`, `remark`, `uploader_id`, `create_time`, `update_time`) VALUES (15, 'common', 'static/common/d13171e6b990a7b3a954ec8b8f078a60', 1, 'akuya.jpeg', '', 3, '2025-02-26 00:58:57', '2025-02-26 00:58:57');
INSERT INTO `upload_file` (`id`, `bucket`, `path`, `type`, `name`, `remark`, `uploader_id`, `create_time`, `update_time`) VALUES (16, 'common', 'static/common/679b4f8b4414765b23c0528ff736851a', 1, 'akuya.jpeg', '', 3, '2025-02-27 07:47:06', '2025-02-27 07:47:06');
INSERT INTO `upload_file` (`id`, `bucket`, `path`, `type`, `name`, `remark`, `uploader_id`, `create_time`, `update_time`) VALUES (17, 'common', 'static/common/08ecf65a3eebb80516537c4ec2a7a624', 1, 'akuya.jpeg', '', 3, '2025-02-27 07:51:55', '2025-02-27 07:51:55');
INSERT INTO `upload_file` (`id`, `bucket`, `path`, `type`, `name`, `remark`, `uploader_id`, `create_time`, `update_time`) VALUES (18, 'common', 'static/common/97aaabaf4a07805ea05afa7d60c1ec59', 1, 'akuya.jpeg', '', 3, '2025-02-27 08:09:36', '2025-02-27 08:09:36');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名',
  `password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码，做了MD5后的密文',
  `valid` bit(1) NOT NULL DEFAULT b'1' COMMENT '是否生效',
  `avatar_id` int DEFAULT NULL COMMENT '头像id',
  `open_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '小程序openid',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `gender` int unsigned NOT NULL COMMENT '性别:2=女,1=男,0=未知',
  `mobile` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号',
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_mobile` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户';

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `username`, `password`, `valid`, `avatar_id`, `open_id`, `remark`, `gender`, `mobile`, `email`, `update_time`, `create_time`) VALUES (1, 'admin', 'FC9D4325E69434CF75B1EB2BF49E9752', b'1', NULL, NULL, '', 0, '', NULL, '2025-02-24 07:33:48', '2024-04-23 16:13:44');
INSERT INTO `user` (`id`, `username`, `password`, `valid`, `avatar_id`, `open_id`, `remark`, `gender`, `mobile`, `email`, `update_time`, `create_time`) VALUES (2, 'yiwei', 'FC9D4325E69434CF75B1EB2BF49E9752', b'1', NULL, NULL, '', 0, '', NULL, '2024-04-30 15:51:17', '2024-04-30 15:51:17');
INSERT INTO `user` (`id`, `username`, `password`, `valid`, `avatar_id`, `open_id`, `remark`, `gender`, `mobile`, `email`, `update_time`, `create_time`) VALUES (3, 'wsy', 'FC9D4325E69434CF75B1EB2BF49E9752', b'1', 18, NULL, '', 0, '', NULL, '2025-02-27 08:17:07', '2024-04-30 15:51:56');
INSERT INTO `user` (`id`, `username`, `password`, `valid`, `avatar_id`, `open_id`, `remark`, `gender`, `mobile`, `email`, `update_time`, `create_time`) VALUES (4, '罗远波', 'FC9D4325E69434CF75B1EB2BF49E9752', b'1', NULL, NULL, '', 0, '', NULL, '2024-05-20 10:10:48', '2024-05-07 16:09:00');
INSERT INTO `user` (`id`, `username`, `password`, `valid`, `avatar_id`, `open_id`, `remark`, `gender`, `mobile`, `email`, `update_time`, `create_time`) VALUES (5, 'cdh', 'FC9D4325E69434CF75B1EB2BF49E9752', b'1', NULL, NULL, '', 0, '', NULL, '2024-05-08 08:38:42', '2024-05-08 08:38:42');
INSERT INTO `user` (`id`, `username`, `password`, `valid`, `avatar_id`, `open_id`, `remark`, `gender`, `mobile`, `email`, `update_time`, `create_time`) VALUES (6, 'admin1', 'FC9D4325E69434CF75B1EB2BF49E9752', b'1', NULL, NULL, '', 0, '', NULL, '2024-05-10 11:30:27', '2024-05-10 11:30:27');
INSERT INTO `user` (`id`, `username`, `password`, `valid`, `avatar_id`, `open_id`, `remark`, `gender`, `mobile`, `email`, `update_time`, `create_time`) VALUES (7, '邹颖东', 'FC9D4325E69434CF75B1EB2BF49E9752', b'1', NULL, NULL, '', 0, '', NULL, '2024-05-20 10:10:36', '2024-05-20 10:10:36');
COMMIT;

-- ----------------------------
-- Table structure for user_department
-- ----------------------------
DROP TABLE IF EXISTS `user_department`;
CREATE TABLE `user_department` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int NOT NULL COMMENT '用户ID',
  `department_id` int NOT NULL COMMENT '科室ID',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_user_department` (`user_id`,`department_id`) USING BTREE,
  UNIQUE KEY `idx_department_user` (`department_id`,`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户关联科室';

-- ----------------------------
-- Records of user_department
-- ----------------------------
BEGIN;
INSERT INTO `user_department` (`id`, `user_id`, `department_id`, `create_time`, `update_time`) VALUES (31, 5, 16, '2024-05-08 08:38:42', '2024-05-08 08:38:42');
INSERT INTO `user_department` (`id`, `user_id`, `department_id`, `create_time`, `update_time`) VALUES (32, 6, 18, '2024-05-10 11:30:27', '2024-05-10 11:30:27');
INSERT INTO `user_department` (`id`, `user_id`, `department_id`, `create_time`, `update_time`) VALUES (34, 7, 1, '2024-05-20 10:10:36', '2024-05-20 10:10:36');
INSERT INTO `user_department` (`id`, `user_id`, `department_id`, `create_time`, `update_time`) VALUES (38, 1, 1, '2025-02-24 07:33:48', '2025-02-24 07:33:48');
INSERT INTO `user_department` (`id`, `user_id`, `department_id`, `create_time`, `update_time`) VALUES (39, 1, 20, '2025-02-24 07:33:48', '2025-02-24 07:33:48');
INSERT INTO `user_department` (`id`, `user_id`, `department_id`, `create_time`, `update_time`) VALUES (40, 1, 21, '2025-02-24 07:33:48', '2025-02-24 07:33:48');
INSERT INTO `user_department` (`id`, `user_id`, `department_id`, `create_time`, `update_time`) VALUES (41, 3, 1, '2025-02-27 08:17:07', '2025-02-27 08:17:07');
COMMIT;

-- ----------------------------
-- Table structure for user_post
-- ----------------------------
DROP TABLE IF EXISTS `user_post`;
CREATE TABLE `user_post` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL COMMENT '用户id',
  `post_id` int NOT NULL COMMENT '岗位id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_user_post` (`user_id`,`post_id`) USING BTREE,
  KEY `idx_post` (`post_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of user_post
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int NOT NULL COMMENT '用户ID',
  `role_id` int NOT NULL COMMENT '角色ID',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_user_role` (`user_id`,`role_id`) USING BTREE,
  KEY `idx_role` (`role_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户关联角色';

-- ----------------------------
-- Records of user_role
-- ----------------------------
BEGIN;
INSERT INTO `user_role` (`id`, `user_id`, `role_id`, `create_time`, `update_time`) VALUES (2, 2, 1, '2024-04-30 15:51:17', '2024-04-30 15:51:17');
INSERT INTO `user_role` (`id`, `user_id`, `role_id`, `create_time`, `update_time`) VALUES (5, 5, 1, '2024-05-08 08:38:42', '2024-05-08 08:38:42');
INSERT INTO `user_role` (`id`, `user_id`, `role_id`, `create_time`, `update_time`) VALUES (6, 6, 1, '2024-05-10 11:30:27', '2024-05-10 11:30:27');
INSERT INTO `user_role` (`id`, `user_id`, `role_id`, `create_time`, `update_time`) VALUES (8, 7, 1, '2024-05-20 10:10:36', '2024-05-20 10:10:36');
INSERT INTO `user_role` (`id`, `user_id`, `role_id`, `create_time`, `update_time`) VALUES (9, 4, 1, '2024-05-20 10:10:48', '2024-05-20 10:10:48');
INSERT INTO `user_role` (`id`, `user_id`, `role_id`, `create_time`, `update_time`) VALUES (13, 1, 1, '2025-02-24 07:33:48', '2025-02-24 07:33:48');
INSERT INTO `user_role` (`id`, `user_id`, `role_id`, `create_time`, `update_time`) VALUES (14, 3, 1, '2025-02-27 08:17:07', '2025-02-27 08:17:07');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
